﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for NhaSanXuatEntity
/// </summary>
public class NhaSanXuatEntity
{

    private int maNSX;
    private string tenNSX;
    public NhaSanXuatEntity()
    { }
    public NhaSanXuatEntity(int maNSX, string tenNSX)
    {
        this.maNSX = maNSX;
        this.tenNSX = tenNSX;
    }
    public int MaNSX
    {
        get { return this.maNSX; }
        set
        {
            if (value == null)
                throw new Exception("maNSX not allow nullvalue.");
            this.maNSX = value;
        }
    }
    public string TenNSX
    {
        get { return this.tenNSX; }
        set { this.tenNSX = value; }
    }
    public override string ToString()
    {
        return this.maNSX + "; " + this.tenNSX + "; ";
    }
    public override bool Equals(Object obj)
    {
        NhaSanXuatEntity me = (NhaSanXuatEntity)obj;
        bool ret = this.MaNSX.Equals(me.MaNSX);
        return ret;
    }
    public override int GetHashCode()
    {
        return this.MaNSX.GetHashCode();
    }

}